"""
获取当前工程内的所有.py程序字符数量
"""
from pathlib import Path
sum = 0
for item in Path.cwd().parent.rglob("*.py"):
    # print(item)
   with open(item,"r",encoding="utf-8") as file:
        sum += len(file.read())
print(sum)


